/**
 * Licensed by the Bunie Developmentgroup.
 */
package Protocol;

import java.io.Serializable;

/**
 * @author Joep Kemperman
 * Packet 
 */
public class ColumnNamePacket extends BasicPacket implements Serializable, BasicPacketInterface {
    
	private Object[] columnNames;
	
    /**
     * Constructor of the basicpacket
     * @param version Version of the basicpacket
     */
    public ColumnNamePacket(int version) {
        super(version);
		this.type = PacketTypeKeeper.COLUMNNAMEPACKET;
    }
    
	/**
	 * Sets columnnames to be sent
	 * @param columnNames Columnnames to be send
	 */
	public void setColumnNames(Object[] columnNames) {
		this.columnNames = columnNames;
	}
	
	/**
	 * Returns the column names
	 * @return Column names
	 */
	public Object[] getColumnNames() {
		return columnNames;
	}
	
    /**
     * Mehode to get the version of the columnnamepacket
     * @return Version of the columnnamepacket
     */
    @Override
    public int getVersion() {
        return this.version;
    }
    
    @Override
    public String toString() {
        return "Version "+version  +" "+
               "Type "   +type + "  ";// PacketTypeKeeper.translate(type)     +" ";
    }

	@Override
	public int getType() {
		return this.type;
	}
}
